import request from '@/utils/request';

// 获取患者列表
export function getPatientsView(params) {
  return request({
    url: '/visit/getPatientsView',
    method: 'get',
    params
  });
}

// 获取患者详情
export function getPatientDetail(id) {
  return request({
    url: '/patient/selectPatientById',
    method: 'get',
    params: { id }
  });
}

// 获取就诊信息
export function getVisitDetail(id) {
  return request({
    url: '/visit/selectVisitById',
    method: 'get',
    params: { id }
  });
}

// 获取患者生命体征
export function getPatientVitalSigns(patientId) {
  return request({
    url: '/patientVitalSigns/selectPatientVitalSignsByPatientId',
    method: 'get',
    params: { patientId }
  });
}

// 获取患者近7条生命体征
export function getRecentPatientVitalSigns(patientId) {
  return request({
    url: '/patientVitalSigns/selectRecent7PatientVitalSignsByPatientId',
    method: 'get',
    params: { patientId }
  });
}

// 获取医嘱列表
export function getMedicalOrderList(data) {
  return request({
    url: '/medicalOrder/list',
    method: 'post',
    data
  });
}

// 获取医嘱详情
export function getMedicalOrderDetail(id) {
  return request({
    url: '/medicalOrder/selectMedicalOrderById',
    method: 'get',
    params: { id }
  });
}

// 获取病历列表
export function getMedicalRecordList(data) {
  return request({
    url: '/medicalRecord/list',
    method: 'post',
    data
  });
}

// 获取病历详情
export function getMedicalRecordDetail(id) {
  return request({
    url: '/medicalRecord/selectMedicalRecordById',
    method: 'get',
    params: { id }
  });
} 